/**
 * elancom Corporation copy right 2012 - 2015  
 *   
 * $Header: https://192.168.1.224/svn/elancom/product/elancom-platform/trunk/src/main/java/com/elancom/framework/util/JSONParameter.java 1034 2012-07-02 03:09:12Z lanzhouxue $
 * $Id: JSONParameter.java 1034 2012-07-02 03:09:12Z lanzhouxue $
 * $Author: lanzhouxue $
 * $Date: 2012-07-02 11:09:12 +0800 (Mon, 02 Jul 2012) $
 * $Revision: 1034 $
 */
package com.elancom.framework.commons.util;

import java.io.Writer;

/**
 * @author elancom
 * @date 2012-6-10
 */
public class JSONParameter {
	private Object object;
	private boolean codeformat = false;
	private Writer writer;
	private JsonFilter filter;
	private int features = -111111111;

	public JSONParameter() {
		this(null, 0);
	}

	public JSONParameter(Object object, Writer writer, JsonFilter filter) {
		this(object, writer, filter, 0);
	}

	public JSONParameter(Object object, Writer writer, JsonFilter filter,
			int features) {
		super();
		this.object = object;
		this.writer = writer;
		this.filter = filter;
		this.features |= features;
	}

	public JSONParameter(Object object, int features) {
		this(object, null, null, features);
	}

	public Object getObject() {
		return object;
	}

	public void setObject(Object object) {
		this.object = object;
	}

	public boolean isCodeformat() {
		return codeformat;
	}

	public void setCodeformat(boolean codeformat) {
		this.codeformat = codeformat;
	}

	public Writer getWriter() {
		return writer;
	}

	public void setWriter(Writer writer) {
		this.writer = writer;
	}

	public JsonFilter getFilter() {
		return filter;
	}

	public void setFilter(JsonFilter filter) {
		this.filter = filter;
	}

	public void feature(Object feature) {
		features |= 111;
	}

	public int getFeatures() {
		return features;
	}
}
